Skip to content

ADFA-5404 | Recover from missing offline language packs - #95

Open
jatezzz wants to merge 4 commits into
fix/ADFA-5403-resolve-llm-from-shared-servicesfrom
fix/ADFA-5404-language-pack-error-handling
Open

ADFA-5404 | Recover from missing offline language packs#95
jatezzz wants to merge 4 commits into
fix/ADFA-5403-resolve-llm-from-shared-servicesfrom
fix/ADFA-5404-language-pack-error-handling

Conversation

@jatezzz

@jatezzz jatezzz commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description

Replaces the generic "unknown error 12" with clear, actionable UI messages that display the specific missing Locale. Implements an automatic single online retry when an offline language pack is missing, ensuring the user's dictation session stays alive without being prematurely aborted.

Details

  • Handled ERROR_LANGUAGE_UNAVAILABLE and ERROR_LANGUAGE_NOT_SUPPORTED in SpeechToTextPlugin.kt.
  • Parameterized preferOffline and set EXTRA_LANGUAGE to support a single online retry attempt.
  • Added detailed UI toasts in strings.xml to inform the user of the exact failing language and the fallback network attempt.
  • Updated index.html documentation to reflect the new language pack recovery behavior.

Prompt EN: Function that reverses a string
Prompt ES: Función que reversa un string

document_4976756881377724759.mp4

Ticket

ADFA-5404
Parent: ADFA-5402

Observation

The plugin now queries checkRecognitionSupport on API 33+ devices to find regional fallback packs or trigger downloads, defaulting to a direct network retry on older SDKs.

…A-5404)

Recognize in the host's configured locale, and on error 12/13 retry once with an installed pack for the same language or online while fetching the missing pack, instead of failing the capture with "unknown error 12".

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@hal-eisen-adfa

Copy link
Copy Markdown
Contributor

I posted on Slack about strings.xml review

@hal-eisen-adfa hal-eisen-adfa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review (Claude Code, high). The branch compiles clean and every new API symbol resolves in libs/plugin-api.jar; the new %1$s/%2$s positions match their str() call sites. Two findings below.

Not device-verified — build only.

Teardown conflict resolved: deactivate() now calls teardown(), which releases the capture via endCapture() instead of destroyRecognizer().
Derive STALE_CAPTURE_MS from the generation timeout so the busy guard cannot expire first, and skip the just-failed tag when matching an installed language pack so the retry cannot repeat the same request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants